home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsICookieService.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  182 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICookieService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICookieService_h__
  6. #define __gen_nsICookieService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIURI; /* forward declaration */
  18.  
  19. class nsIPrompt; /* forward declaration */
  20.  
  21. class nsIChannel; /* forward declaration */
  22.  
  23.  
  24. /* starting interface:    nsICookieService */
  25. #define NS_ICOOKIESERVICE_IID_STR "011c3190-1434-11d6-a618-0010a401eb10"
  26.  
  27. #define NS_ICOOKIESERVICE_IID \
  28.   {0x011c3190, 0x1434, 0x11d6, \
  29.     { 0xa6, 0x18, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 }}
  30.  
  31. /**
  32.  * nsICookieService
  33.  *
  34.  * Provides methods for setting and getting cookies in the context of a
  35.  * page load.  See nsICookieManager for methods to manipulate the cookie
  36.  * database directly.  This separation of interface is mainly historical.
  37.  *
  38.  * This service broadcasts the following notifications when the cookie
  39.  * list is changed, or a cookie is rejected:
  40.  *
  41.  * topic  : "cookie-changed"
  42.  *          broadcast whenever the cookie list changes in some way. there
  43.  *          are four possible data strings for this notification; one
  44.  *          notification will be broadcast for each change, and will involve
  45.  *          a single cookie.
  46.  * subject: an nsICookie2 interface pointer representing the cookie object
  47.  *          that changed.
  48.  * data   : "deleted"
  49.  *          a cookie was deleted. the subject is the deleted cookie.
  50.  *          "added"
  51.  *          a cookie was added. the subject is the added cookie.
  52.  *          "changed"
  53.  *          a cookie was changed. the subject is the new cookie.
  54.  *          "cleared"
  55.  *          the entire cookie list was cleared. the subject is null.
  56.  *
  57.  * topic  : "cookie-rejected"
  58.  *          broadcast whenever a cookie was rejected from being set as a
  59.  *          result of user prefs.
  60.  * subject: an nsIURI interface pointer representing the URI that attempted
  61.  *          to set the cookie.
  62.  * data   : none.
  63.  */
  64. class NS_NO_VTABLE nsICookieService : public nsISupports {
  65.  public: 
  66.  
  67.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOOKIESERVICE_IID)
  68.  
  69.   /* string getCookieString (in nsIURI aURI, in nsIChannel aChannel); */
  70.   NS_IMETHOD GetCookieString(nsIURI *aURI, nsIChannel *aChannel, char **_retval) = 0;
  71.  
  72.   /* string getCookieStringFromHttp (in nsIURI aURI, in nsIURI aFirstURI, in nsIChannel aChannel); */
  73.   NS_IMETHOD GetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIChannel *aChannel, char **_retval) = 0;
  74.  
  75.   /* void setCookieString (in nsIURI aURI, in nsIPrompt aPrompt, in string aCookie, in nsIChannel aChannel); */
  76.   NS_IMETHOD SetCookieString(nsIURI *aURI, nsIPrompt *aPrompt, const char *aCookie, nsIChannel *aChannel) = 0;
  77.  
  78.   /* void setCookieStringFromHttp (in nsIURI aURI, in nsIURI aFirstURI, in nsIPrompt aPrompt, in string aCookie, in string aServerTime, in nsIChannel aChannel); */
  79.   NS_IMETHOD SetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char *aCookie, const char *aServerTime, nsIChannel *aChannel) = 0;
  80.  
  81.   /**
  82.    * This attribute really doesn't belong on this interface.  CVS blame will
  83.    * tell you why it is here.  It remains until we can find a better home for
  84.    * it.  Read the source if you want to know what it does :-(
  85.    */
  86.   /* readonly attribute boolean cookieIconIsVisible; */
  87.   NS_IMETHOD GetCookieIconIsVisible(PRBool *aCookieIconIsVisible) = 0;
  88.  
  89. };
  90.  
  91. /* Use this macro when declaring classes that implement this interface. */
  92. #define NS_DECL_NSICOOKIESERVICE \
  93.   NS_IMETHOD GetCookieString(nsIURI *aURI, nsIChannel *aChannel, char **_retval); \
  94.   NS_IMETHOD GetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIChannel *aChannel, char **_retval); \
  95.   NS_IMETHOD SetCookieString(nsIURI *aURI, nsIPrompt *aPrompt, const char *aCookie, nsIChannel *aChannel); \
  96.   NS_IMETHOD SetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char *aCookie, const char *aServerTime, nsIChannel *aChannel); \
  97.   NS_IMETHOD GetCookieIconIsVisible(PRBool *aCookieIconIsVisible); 
  98.  
  99. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  100. #define NS_FORWARD_NSICOOKIESERVICE(_to) \
  101.   NS_IMETHOD GetCookieString(nsIURI *aURI, nsIChannel *aChannel, char **_retval) { return _to GetCookieString(aURI, aChannel, _retval); } \
  102.   NS_IMETHOD GetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIChannel *aChannel, char **_retval) { return _to GetCookieStringFromHttp(aURI, aFirstURI, aChannel, _retval); } \
  103.   NS_IMETHOD SetCookieString(nsIURI *aURI, nsIPrompt *aPrompt, const char *aCookie, nsIChannel *aChannel) { return _to SetCookieString(aURI, aPrompt, aCookie, aChannel); } \
  104.   NS_IMETHOD SetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char *aCookie, const char *aServerTime, nsIChannel *aChannel) { return _to SetCookieStringFromHttp(aURI, aFirstURI, aPrompt, aCookie, aServerTime, aChannel); } \
  105.   NS_IMETHOD GetCookieIconIsVisible(PRBool *aCookieIconIsVisible) { return _to GetCookieIconIsVisible(aCookieIconIsVisible); } 
  106.  
  107. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  108. #define NS_FORWARD_SAFE_NSICOOKIESERVICE(_to) \
  109.   NS_IMETHOD GetCookieString(nsIURI *aURI, nsIChannel *aChannel, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookieString(aURI, aChannel, _retval); } \
  110.   NS_IMETHOD GetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIChannel *aChannel, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookieStringFromHttp(aURI, aFirstURI, aChannel, _retval); } \
  111.   NS_IMETHOD SetCookieString(nsIURI *aURI, nsIPrompt *aPrompt, const char *aCookie, nsIChannel *aChannel) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCookieString(aURI, aPrompt, aCookie, aChannel); } \
  112.   NS_IMETHOD SetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char *aCookie, const char *aServerTime, nsIChannel *aChannel) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCookieStringFromHttp(aURI, aFirstURI, aPrompt, aCookie, aServerTime, aChannel); } \
  113.   NS_IMETHOD GetCookieIconIsVisible(PRBool *aCookieIconIsVisible) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookieIconIsVisible(aCookieIconIsVisible); } 
  114.  
  115. #if 0
  116. /* Use the code below as a template for the implementation class for this interface. */
  117.  
  118. /* Header file */
  119. class nsCookieService : public nsICookieService
  120. {
  121. public:
  122.   NS_DECL_ISUPPORTS
  123.   NS_DECL_NSICOOKIESERVICE
  124.  
  125.   nsCookieService();
  126.  
  127. private:
  128.   ~nsCookieService();
  129.  
  130. protected:
  131.   /* additional members */
  132. };
  133.  
  134. /* Implementation file */
  135. NS_IMPL_ISUPPORTS1(nsCookieService, nsICookieService)
  136.  
  137. nsCookieService::nsCookieService()
  138. {
  139.   /* member initializers and constructor code */
  140. }
  141.  
  142. nsCookieService::~nsCookieService()
  143. {
  144.   /* destructor code */
  145. }
  146.  
  147. /* string getCookieString (in nsIURI aURI, in nsIChannel aChannel); */
  148. NS_IMETHODIMP nsCookieService::GetCookieString(nsIURI *aURI, nsIChannel *aChannel, char **_retval)
  149. {
  150.     return NS_ERROR_NOT_IMPLEMENTED;
  151. }
  152.  
  153. /* string getCookieStringFromHttp (in nsIURI aURI, in nsIURI aFirstURI, in nsIChannel aChannel); */
  154. NS_IMETHODIMP nsCookieService::GetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIChannel *aChannel, char **_retval)
  155. {
  156.     return NS_ERROR_NOT_IMPLEMENTED;
  157. }
  158.  
  159. /* void setCookieString (in nsIURI aURI, in nsIPrompt aPrompt, in string aCookie, in nsIChannel aChannel); */
  160. NS_IMETHODIMP nsCookieService::SetCookieString(nsIURI *aURI, nsIPrompt *aPrompt, const char *aCookie, nsIChannel *aChannel)
  161. {
  162.     return NS_ERROR_NOT_IMPLEMENTED;
  163. }
  164.  
  165. /* void setCookieStringFromHttp (in nsIURI aURI, in nsIURI aFirstURI, in nsIPrompt aPrompt, in string aCookie, in string aServerTime, in nsIChannel aChannel); */
  166. NS_IMETHODIMP nsCookieService::SetCookieStringFromHttp(nsIURI *aURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char *aCookie, const char *aServerTime, nsIChannel *aChannel)
  167. {
  168.     return NS_ERROR_NOT_IMPLEMENTED;
  169. }
  170.  
  171. /* readonly attribute boolean cookieIconIsVisible; */
  172. NS_IMETHODIMP nsCookieService::GetCookieIconIsVisible(PRBool *aCookieIconIsVisible)
  173. {
  174.     return NS_ERROR_NOT_IMPLEMENTED;
  175. }
  176.  
  177. /* End of implementation class template. */
  178. #endif
  179.  
  180.  
  181. #endif /* __gen_nsICookieService_h__ */
  182.